import config from '@/config/cookbookConfig'
import { get, post } from '@/utils/request'

/**
 * 获取菜谱大全幻灯片接口
 * @returns Promise
 */
export const getSwiperApi = () => get(config.swiper)

// 热门分类
export const getHotCateApi = () => get(config.hotcate)

// 好菜
export const getGoodfoodApi = async () => {
  let result = { data: [] }
  let ret = await get(config.goodfood)

  result.data = ret.data.slice(0, 30)
  return result
}